package com.zdkj.subway.check.fegin;

import com.zdkj.common.core.constant.SecurityConstants;
import com.zdkj.common.core.constant.ServiceNameConstants;
import com.zdkj.common.core.util.R;
import com.zdkj.subway.check.dto.SwStReportqueryStationincomeDTO;
import com.zdkj.subway.check.entity.SwStConductorSettle;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;


@FeignClient(contextId = "subwayStmService", value = ServiceNameConstants.SUBWAY_STM_SERVICE)
@Component
public interface SubwayStmService {
    /**
     * 通过线路站点收入日期查询车站营收日报表
     *
     * @param swStReportqueryStationincomeDTO
     * @param from
     * @return
     */
    @PostMapping("/swstreportquery/cheZhanYingShouAllAmount")
    R cheZhanYingShouAllAmount(@RequestBody SwStReportqueryStationincomeDTO swStReportqueryStationincomeDTO,
                                           @RequestHeader(SecurityConstants.FROM) String from);
    /**
     * 修改入账日期重新生成车站营收日报
     *
     * @param lineCode
     * @param from
     * @return
     */
    @PostMapping("/swstreportquery/refreshStationOfIncome")
    R refreshStationincome(@RequestParam("lineCode") String lineCode, @RequestParam("stationCode") String stationCode, @RequestParam("statisticsDate") String statisticsDate,
                           @RequestHeader(SecurityConstants.FROM) String from);

    /**
     * 合并数据  对两条数据进行合并  审核补提交合并调用
     * @param
     * @param from
     * @return
     */
    @PostMapping("/swstconductorsettle/submissionMerge")
    R<Map<String,String>> submissionMerge(@RequestBody SwStConductorSettle settle,
                                          @RequestParam("paramStar") String paramStar,
                                          @RequestParam("idList") List<Integer> idList,
                                          @RequestParam("conductorShifts") String conductorShifts,
                                          @RequestParam("isFlag") Boolean isFlag,
                                          @RequestParam("normal") Boolean normal,
                                          @RequestHeader(SecurityConstants.FROM) String from);

}
